﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EcodexIntegrationSample.Forms
{
    public partial class frmObtenerUltimosDocumentosTimbrados : Form, View.IfrmObtenerUltimosDocumentosTimbrados
    {
        public frmObtenerUltimosDocumentosTimbrados()
        {
            InitializeComponent();
            var controller = new Controllers.frmObtenerUltimosDocumentosTimbradosController(this);
        }

        public string RFCEmisor
        {
            get { return txtRFC.Text; }
        }

        public string Respuesta
        {
            get { return txtRespuesta.Text; }


            set { txtRespuesta.Text = value; }
        }

        public event EventHandler onBuscarUltimosDocumentosTimbrados;

        private void btnCancelaMultiple_Click(object sender, EventArgs e)
        {
            if (onBuscarUltimosDocumentosTimbrados != null)
                onBuscarUltimosDocumentosTimbrados(this, e);
        }

        public void ShowSessionError(Entity.SessionError error)
        {
            MessageBox.Show(String.Format("Status {0}: {1}", error.Status.ToString(), error.Description), "Ecodex Test");
        }

        public void ShowUnknownError(string message)
        {
            MessageBox.Show(String.Format("Error: {0}", message), "Ecodex Test");
        }
    }
}
